package com.safety.apitest.source;

import com.safety.apitest.beans.SensorReading;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;

/**
 * @Author: QingW
 * @Date: 2021/9/17
 */
public class SourceTest2_File {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<String> dataStream = env.readTextFile("E:\\flink\\flink-learning\\src\\main\\resources\\sensor.txt");
        dataStream.print();
        env.execute("Wang-Create-JobFile");
    }


}
